import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {ApiUrl} from "../../../config/api-url";
import {BaseService} from "../../../shared/service/base.service";

@Component({
  selector: 'app-contract',
  templateUrl: './contract.component.html',
  styleUrls: ['./contract.component.less']
})
export class ContractComponent implements OnInit {
  @Input()
  isVisible = false;
  @Output()
  settingContract: EventEmitter<any> = new EventEmitter<any>();

  isSpinning: any;

  title = '合同签署';

  constructor(private baseService: BaseService) {
  }

  ngOnInit(): void {
  }

  closeModal() {
    this.isVisible = false;
    this.settingContract.emit(this.isVisible);
  }

  affirm() {
    this.baseService.get(ApiUrl.UserUrl + "/changeSignStatus").subscribe(res => {
      this.closeModal();
    })
  }

}
